package tas.sql;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author parainformaticos.com
 */
public class ConectaDb {

    public Connection getBdtas() {
        Connection cn = null;

        try {
//            Class.forName("oracle.jdbc.OracleDriver").newInstance();
//            cn = DriverManager.getConnection(
//                    "jdbc:oracle:thin:@192.168.1.180:1521:ORCL",
//                    "SYSTEM", "cosapi"); // Hhyd4493
//    

            Class.forName("oracle.jdbc.OracleDriver").newInstance();
            cn = DriverManager.getConnection(
                    "jdbc:oracle:thin:@localhost:1521:xe",
                    "SYSTEM", "oracle"); // Hhyd4493

        } catch (SQLException ex) {
        } catch (ClassNotFoundException ex) {
        } catch (InstantiationException ex) {
        } catch (IllegalAccessException ex) {
        }

        return cn;
    }

    public ConectaDb() {
    }
}
